// RecordExporter.h: interface for the RecordExporter class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RECORDEXPORTER_H__12DF099C_ACF7_46DA_88EF_AD0D13ED7F76__INCLUDED_)
#define AFX_RECORDEXPORTER_H__12DF099C_ACF7_46DA_88EF_AD0D13ED7F76__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "..\ExcelLib\Excel9.h"

struct RecordAckStruct;
struct RecordItem;

class RecordExporter
{
public:
	RecordExporter(RecordAckStruct * pRecordAckStruct, int nMaxNumOfRows, int nMaxNumOfCols);
	virtual ~RecordExporter();

	enum {DefMaxNumOfRows = 40, DefMaxNumOfCols = 3};

	virtual void GetRecordString(long nCoalMineId, const CString& strMonUnitId, RecordItem * pRecordItem, CString& strTime, CString& strData) const = 0;
	virtual void GetMonUnitString(long nCoalMineId, const CString& strMonUnitId, CString& str) const = 0;

	bool Export();

protected:
	void SetExcelFont(Font& font, const LOGFONT& lf, COLORREF crFont);
	void ConvertColRowToString(int nCol, int nRow, CString& str);

protected:
	RecordAckStruct * m_pRecordAckStruct;
	int m_nMaxNumOfRows;
	int m_nMaxNumOfCols;
};

#endif // !defined(AFX_RECORDEXPORTER_H__12DF099C_ACF7_46DA_88EF_AD0D13ED7F76__INCLUDED_)
